﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/ControlPanel.Master" AutoEventWireup="true" CodeBehind="EditNews.aspx.cs" Inherits="intecnologia.Admin.EditNews" %>
<%@ Register
    Assembly="AjaxControlToolkit"
    Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="HTMLEditor" %>
    
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <asp:ScriptManager ID="AjaxScriptManager" runat="server">
    </asp:ScriptManager>
    
    <br />
    <br />
    <center>
        <% if (_pageMode == "add")
           {%>            
                <h2>Agregar Noticia Nueva</h2>
        <% } else if (_pageMode == "edit") { %>
                <h2>Editar Noticia</h2>
        <% } %>
    </center>
    <br />
    <table style="width: 720px; margin-left: 30px;" >
        <tr style="text-align: left;">
            <td style="width: 110px"><span style="font-weight: bold; font-size: 1.1em;">Título:</span></td>
            <td><asp:TextBox ID="tbTitle" runat="server" Width="595px"></asp:TextBox></td>
        </tr>
        <tr style="text-align: left;">
            <td style="width: 110px"><span style="font-weight: bold; font-size: 1.1em;">Descripción:</span></td>
            <td><asp:TextBox ID="tbDescription" runat="server" Width="595px"></asp:TextBox></td>
        </tr>
    </table>
    <center>
        <div style="width: 720px;">
            <HTMLEditor:Editor ID="newsEditor" runat="server" 
                Height="300px" 
                Width="100%"
                AutoFocus="true"
            />
        </div>
        
        <br />
        
        <asp:CheckBox ID="cbPostInTwitter" runat="server" 
            Text="Realizar post en twitter" />
        <br />
        <br />
        
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            ErrorMessage="Debe introducir un título." Display="Dynamic"
            ControlToValidate="tbTitle">
        </asp:RequiredFieldValidator>
        
        <br />
        
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            ErrorMessage="Debe introducir una descripción." Display="Dynamic"
            ControlToValidate="tbDescription">
        </asp:RequiredFieldValidator>     
        
        <br />
        <br />
        
        <asp:Button ID="btnSubmitChanges" runat="server" Text="Aceptar" 
            CssClass="boton" onclick="btnSubmitChanges_Click" />
        <asp:Button ID="btnCancel" runat="server" Text="Cancelar" CssClass="boton" 
            onclick="btnCancel_Click" />
    </center>
    <br />

</asp:Content>
